package com.olah.user.service;

import com.olah.common.entity.dto.request.user.*;
import com.olah.common.entity.po.user.CertificationInfo;
import com.olah.user.dao.InfoUpdateDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class InfoUpdateService {

    @Resource
    private InfoUpdateDao dao;

    public boolean updateBase(UpdateProfileBaseInfo info) {
        return dao.updateBase(info) == 1;
    }

    public boolean updateBind(UpdateProfileBindInfo info) {
        return dao.updateBind(info) == 1;
    }

    public boolean updatePassword(UpdatePasswdInfo info) {
        return dao.updatePassword(info) == 1;
    }

    public boolean updateNotify(UpdateNotifyInfo info) {
        return dao.updateNotify(info) == 1;
    }

    public boolean updateGoodness(UpdateGoodnessInfo info) {
        dao.updateGoodness(info);
        return true;
    }

    public boolean certification(CertificationInfo certificationInfo) {
        return dao.certification(certificationInfo) == 1;
    }

}
